﻿Imports System.ComponentModel
Imports System.Drawing

Public Class GridProp
    Inherits GPropLayer


    Public Sub New(ByVal ln As String, ByVal fn As String, ByVal lt As LAYERTYPE, ByVal bs As Boolean)
        MyBase.New(ln, fn, lt, bs)

        '下面添加自己的代码
        m_XCells = 1
        m_YCells = 1
        m_LBPointXA = 0
        m_LBPointYA = 0
        'm_LBPointY = 0
        'm_LBPointX = 0
        m_XunitL = 1
        m_YuintL = 1

        m_IsShowXLine = True
        m_IsShowYline = True

      
    End Sub


    '事件模型
    Public Event NeedForRedraw(ByVal ap As GridProp)


    Dim m_LBPointXA As Double
    <CategoryAttribute("特定设置"), _
 DisplayName("左下点绝对坐标X")> _
   Public Property LBPointXAProperty() As Double
        Get
            Return m_LBPointXA
        End Get
        Set(ByVal value As Double)
           
            m_LBPointXA = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_LBPointYA As Double
    <CategoryAttribute("特定设置"), _
DisplayName("左下点绝对坐标Y")> _
   Public Property LBPointYAProperty() As Double
        Get
            Return m_LBPointYA
        End Get
        Set(ByVal value As Double)

            m_LBPointYA = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property


   

    Dim m_XCells As Integer
    <CategoryAttribute("特定设置"), _
DisplayName("X轴单元格数")> _
   Public Property XCellsProperty() As Integer
        Get
            Return m_XCells
        End Get
        Set(ByVal value As Integer)
            If value < 0 Then
                value = 0
            End If
            m_XCells = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_YCells As Integer
    <CategoryAttribute("特定设置"), _
DisplayName("Y轴单元格数")> _
   Public Property YCellsProperty() As Integer
        Get
            Return m_YCells
        End Get
        Set(ByVal value As Integer)
            If value < 0 Then
                value = 0
            End If
            m_YCells = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_XunitL As Double
    <CategoryAttribute("特定设置"), _
DisplayName("X轴单元格长度")> _
   Public Property XunitLProperty() As Double
        Get
            Return m_XunitL
        End Get
        Set(ByVal value As Double)
            If value < 0 Then
                value = 0
            End If
            m_XunitL = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_YuintL As Double
    <CategoryAttribute("特定设置"), _
DisplayName("Y轴单元格长度")> _
   Public Property YuintLProperty() As Double
        Get
            Return m_YuintL
        End Get
        Set(ByVal value As Double)
            If value < 0 Then
                value = 0
            End If
            m_YuintL = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property

    Dim m_IsShowXLine As Boolean
    <CategoryAttribute("特定设置"), _
DisplayName("显示横向网格线")> _
  Public Property IsShowXLineProperty() As Boolean
        Get
            Return m_IsShowXLine
        End Get
        Set(ByVal value As Boolean)
            m_IsShowXLine = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property
    Dim m_IsShowYline As Boolean
    <CategoryAttribute("特定设置"), _
DisplayName("显示纵向网格线")> _
  Public Property IsShowYlineProperty() As Boolean
        Get
            Return m_IsShowYline
        End Get
        Set(ByVal value As Boolean)
            m_IsShowYline = value
            RaiseEvent NeedForRedraw(Me)
        End Set
    End Property



    '重写的一些属性,下面主要是与点相关的部分，呵呵
    <CategoryAttribute("外观设置"), _
   DisplayName("点类型"), _
   BrowsableAttribute(False)> _
   Public Overrides Property PointtypeProperty() As MapWinGIS.tkPointType
        Get

        End Get
        Set(ByVal value As MapWinGIS.tkPointType)



        End Set
    End Property

    <BrowsableAttribute(False)> _
   Public Overrides Property PointColorProperty() As Color
        Get

        End Get
        Set(ByVal value As Color)

        End Set
    End Property


    <BrowsableAttribute(False)> _
    Public Overrides Property PointsizeProperty() As Double
        Get

        End Get
        Set(ByVal value As Double)

        End Set
    End Property



    <BrowsableAttribute(False)> _
    Public Overrides Property PtUdpImgProperty() As String
        Get

        End Get

        Set(ByVal value As String)

        End Set
    End Property
End Class
